\documentclass{article}
\begin{document}
Hello \TeX!

%% in-text formula, use \(..\), $..$, \begin{math} .. \end{math}
in-text formula

if $\alpha = 2$, then $\alpha^3=8$



%% display formula, use \[..]\, \begin{displaymath} .. \end{displaymath}
display formula

\[
\lim_{n \to \infty}
\sum_{k=1}^n \frac{1}{k^2} = \frac{\pi^2}{6}
\]


\begin{equation}
  a^x+y \neq a^{x+y}
\end{equation}

%% use \label & \ref to reference fomula
\begin{equation} \label{eq:eps}
  \epsilon > 0
\end{equation}

From (\ref{eq:eps}), we gather \ldots


%% overline
$ F = \overline{A+B} \cdot C $
$ \underline{m+n} $

$S = \underbrace{a+b+\cdots+z}_{26}$



\[
\alpha, \beta, \gamma, \Omega
\]



\[
\phi = \sum^\infty_{t=0}\beta^t U(c_t,x_t)\mbox{}
\]

$\sum^\infty_{t=0}\alpha^t$

$c^{2}=a^{2}+b^{2}$

$d^2=a^2+b^2$

\[
S = \sum^31_{t=0}
\]

this $is$ $\heartsuit$


\begin{displaymath}
  c^2 = a^2 + b^2
\end{displaymath}
  


\end{document}

